<%--
  Created by IntelliJ IDEA.
  User: Demon-pro
  Date: 2015/7/2
  Time: 11:14
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <%@include file="../includes/head.jsp" %>
    <title>${menu.menuName}</title>
</head>
<body class="page-header-fixed page-quick-sidebar-over-content">
<%@include file="../includes/top.jsp" %>
<div class="page-container">
    <%@include file="../includes/sidebar.jsp" %>
    <div class="page-content-wrapper">
        <div class="page-content">
            <%@include file="../includes/current.jsp" %>
            <div class="row">
                <div class="col-md-12">
                    <div class="portlet box">
                        <div class="portlet-body form">
                            <div class="form-body myContent">
                                <!--道体阻力-->
                                <c:forEach items="${baseList}" var="base" varStatus="baseCursor">
                                    <div class="panel-group accordion" id="panel_${baseCursor.index}"
                                         baseId="${base.id}">
                                        <div class="panel panel-success">
                                            <div class="panel-heading">
                                                <h4 class="panel-title">
                                                    <a class="accordion-toggle" data-toggle="collapse"
                                                       data-parent="#panel_${baseCursor.index}"
                                                       href="#panel-body_${baseCursor.index}">
                                                            ${base.title}
                                                    </a>
                                                </h4>
                                            </div>
                                            <div id="panel-body_${baseCursor.index}" class="panel-collapse collapse in">
                                                <div class="panel-body">
                                                    <div class="col-md-12 tools">
                                                        <a href="javascript:;" class="btn purple edit">修改总标题</a>
                                                    </div>
                                                    <div class="col-md-12 margin-bottom-20">
                                                        <div class="col-md-12 level-2-title">
                                                            <h3>
                                                                道体参数
                                                            </h3>
                                                        </div>
                                                        <div class="col-md-12 level-2-content">
                                                            <table>
                                                                <thead>
                                                                <tr>
                                                                    <th width="20%"></th>
                                                                    <th width="20%"></th>
                                                                    <th width="20%"></th>
                                                                </tr>
                                                                </thead>
                                                                <tbody>
                                                                <tr>
                                                                    <td rowspan="2" valign="middle">
                                                                        <div class="col-md-12 margin-bottom-20">
                                                                            <div class="form-group">
                                                                                <label class="control-label col-md-3"
                                                                                       style="padding-left: 0; padding-right: 0;">
                                                                                    管道形状
                                                                                </label>

                                                                                <div class="col-md-9">
                                                                                    <select name="E4">
                                                                                        <option value="1">圆形</option>
                                                                                        <option value="2"
                                                                                                <c:if test="${base.e4 == 2}">selected="selected"</c:if>>
                                                                                            矩形
                                                                                        </option>
                                                                                    </select>
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                    </td>
                                                                    <td>
                                                                        <div class="col-md-12 margin-bottom-20">
                                                                            <div class="form-group">
                                                                                <label class="control-label col-md-3"
                                                                                       style="padding-left: 0; padding-right: 0;"
                                                                                        >
                                                                                    管道高度a
                                                                                </label>

                                                                                <div class="col-md-9">
                                                                                    <input type="text"
                                                                                           class="form-control input-inline"
                                                                                           name="E6" value="${base.e6}">
                                                                    <span class="help-inline">
                                                                        mm
                                                                    </span>
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                    </td>
                                                                    <td>
                                                                        <div class="col-md-12 margin-bottom-20">
                                                                            <div class="form-group">
                                                                                <label class="control-label col-md-3"
                                                                                       style="padding-left: 0; padding-right: 0;"
                                                                                        >
                                                                                    管道直径D
                                                                                </label>

                                                                                <div class="col-md-9">
                                                                                    <input type="text"
                                                                                           class="form-control input-inline"
                                                                                           name="E7" value="${base.e7}">
                                                                    <span class="help-inline">
                                                                        mm
                                                                    </span>
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                    </td>
                                                                <tr>
                                                                    <td>
                                                                        <div class="col-md-12 margin-bottom-20">
                                                                            <div class="form-group">
                                                                                <label class="control-label col-md-3"
                                                                                       style="padding-left: 0; padding-right: 0;"
                                                                                        >
                                                                                    管道宽度b
                                                                                </label>

                                                                                <div class="col-md-9">
                                                                                    <input type="text"
                                                                                           class="form-control input-inline"
                                                                                           name="E5" value="${base.e5}">
                                                                <span class="help-inline">
                                                                    mm
                                                                </span>
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                    </td>
                                                                    <td>
                                                                        <div class="col-md-12">
                                                                            <div class="form-group">
                                                                                <label class="control-label col-md-3"
                                                                                       style="padding-left: 0; padding-right: 0;"
                                                                                        >
                                                                                    管道壁厚δ
                                                                                </label>

                                                                                <div class="col-md-9">
                                                                                    <input type="text"
                                                                                           class="form-control input-inline"
                                                                                           name="E9" value="${base.e9}">
                                                                    <span class="help-inline">
                                                                        mm
                                                                    </span>
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                    </td>
                                                                </tr>
                                                                </tbody>
                                                            </table>
                                                            <div class="col-md-12">
                                                                <div class="col-md-6">
                                                                    <div class="form-group">
                                                                        <label class="control-label col-md-3"
                                                                               style="padding-left: 0; padding-right: 0;"
                                                                                >
                                                                            管内壁绝对粗糙度△
                                                                        </label>

                                                                        <div class="col-md-9">
                                                                            <input type="text"
                                                                                   class="form-control input-inline"
                                                                                   name="E18" value="${base.e18}">
                                                                        <span class="help-inline">
                                                                            mm
                                                                        </span>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="col-md-6">
                                                                    <div class="form-group">
                                                                        <label class="control-label col-md-3"
                                                                               style="padding-left: 0; padding-right: 0;">
                                                                            提升高度h
                                                                        </label>

                                                                        <div class="col-md-9">
                                                                            <input type="text"
                                                                                   class="form-control input-inline"
                                                                                   name="E81" value="${base.e81}">
                                                                        <span class="help-inline">
                                                                            m
                                                                        </span>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-12 margin-bottom-20">
                                                        <div class="col-md-12">
                                                            <h3>工质参数</h3>
                                                        </div>
                                                        <div class="col-md-12">
                                                            <div class="col-md-4">
                                                                <div class="form-group">
                                                                    <label class="control-label col-md-3"
                                                                           style="padding-left: 0; padding-right: 0;"
                                                                            >
                                                                        含尘浓度
                                                                    </label>

                                                                    <div class="col-md-9">
                                                                        <input type="text"
                                                                               class="form-control input-inline"
                                                                               name="E13" value="${base.e13}">
                                                            <span class="help-inline">
                                                                Kg/Kg
                                                            </span>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <div class="col-md-4">
                                                                <div class="form-group">
                                                                    <label class="control-label col-md-3"
                                                                           style="padding-left: 0; padding-right: 0;"
                                                                            >
                                                                        温度t
                                                                    </label>

                                                                    <div class="col-md-9">
                                                                        <input type="text"
                                                                               class="form-control input-inline"
                                                                               name="E11" value="${base.e11}">
                                                            <span class="help-inline">
                                                                ℃
                                                            </span>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <div class="col-md-4">
                                                                <div class="form-group">
                                                                    <label class="control-label col-md-3"
                                                                           style="padding-left: 0; padding-right: 0;"
                                                                            >
                                                                        含湿量d
                                                                    </label>

                                                                    <div class="col-md-9">
                                                                        <input type="text"
                                                                               class="form-control input-inline"
                                                                               name="E12" value="${base.e12}">
                                                            <span class="help-inline">
                                                                g/Kg
                                                            </span>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="col-md-12">
                                                        <div class="panel-group accordion"
                                                             id="panel_sub_${baseCursor.index}">
                                                            <div class="panel panel-info">
                                                                <div class="panel-heading">
                                                                    <h4 class="panel-title">
                                                                        <a class="accordion-toggle"
                                                                           data-toggle="collapse"
                                                                           data-parent="#panel_sub_${baseCursor.index}"
                                                                           href="#panel1-body_sub_${baseCursor.index}">
                                                                            道体阻力
                                                                        </a>
                                                                    </h4>
                                                                </div>
                                                                <div id="panel1-body_sub_${baseCursor.index}"
                                                                     class="panel-collapse collapse in">
                                                                    <div class="panel-body">
                                                                        <c:forEach items="${base.taoList}" var="tao"
                                                                                   varStatus="taoCursor">
                                                                            <table class="table table-full-width table-bordered interval taoindexCount"
                                                                                   taoId="${tao.id}">

                                                                                <caption class="fother"><h3
                                                                                        class="editable">${tao.title}</h3>
                                                                                </caption>
                                                                                <thead>
                                                                                <tr>
                                                                                    <th></th>
                                                                                    <th></th>
                                                                                    <th class="text-center">类型</th>
                                                                                    <th class="text-center">阻力系数</th>
                                                                                    <th class="text-center">动压头</th>
                                                                                    <th class="text-center">阻力损失</th>
                                                                                </tr>
                                                                                </thead>
                                                                                <tbody>
                                                                                <tr>
                                                                                    <td><a href="javascript:;"
                                                                                           class="btn yellow hideAll"
                                                                                           data-flag="管段"><i
                                                                                            class="fa fa-angle-up"></i></a>
                                                                                    </td>
                                                                                    <td colspan="5"><h4>沿程阻力</h4></td>
                                                                                </tr>
                                                                                <c:forEach items="${tao.sectionList}"
                                                                                           var="section"
                                                                                           varStatus="sectionSta">
                                                                                    <c:if test="${section.sectionType == 1}">
                                                                                        <tr data-flag="管段"
                                                                                            id="${section.id}">
                                                                                            <td>
                                                                                                <a href="javascript:;"
                                                                                                   class="${section.classA}">
                                                                                                    <i class="${section.classI}"></i>
                                                                                                </a>
                                                                                            </td>
                                                                                            <td class="editable">${section.childTitle}</td>
                                                                                            <td>
                                                                                                <select>
                                                                                                    <option value="null"
                                                                                                            <c:if test="${'null'.equals(section.type)}">selected="selected"</c:if>>
                                                                                                        请选择类型
                                                                                                    </option>
                                                                                                    <option value="straight"
                                                                                                            <c:if test="${'straight'.equals(section.type)}">selected="selected"</c:if>>
                                                                                                        直管型
                                                                                                    </option>
                                                                                                    <option value="inner-support"
                                                                                                            <c:if test="${'inner-support'.equals(section.type)}">selected="selected"</c:if>>
                                                                                                        内撑
                                                                                                    </option>
                                                                                                </select>
                                                                                            </td>
                                                                                            <td>
                                                                                                <input class="form-control input-small"
                                                                                                       type="text"
                                                                                                       value="${section.coefficient}">
                                                                                            </td>
                                                                                            <td>
                                                                                                <input class="form-control input-small"
                                                                                                       type="text"
                                                                                                       value="${section.dyHead}">
                                                                                            </td>
                                                                                            <td>
                                                                                                <input class="form-control input-small"
                                                                                                       type="text"
                                                                                                       value="${section.resistanceLost}">
                                                                                            </td>
                                                                                        </tr>
                                                                                    </c:if>
                                                                                </c:forEach>

                                                                                <tr>
                                                                                    <td><a href="javascript:;"
                                                                                           class="btn yellow hideAll"
                                                                                           data-flag="零件"><i
                                                                                            class="fa fa-angle-up"></i></a>
                                                                                    </td>
                                                                                    <td colspan="5"><h4>局部阻力</h4></td>
                                                                                </tr>
                                                                                <c:forEach items="${tao.sectionList}"
                                                                                           var="section"
                                                                                           varStatus="sectionSta"
                                                                                           begin="0">
                                                                                    <c:if test="${section.sectionType == 2}">
                                                                                        <tr data-flag="零件"
                                                                                            id="${section.id}">
                                                                                            <td>
                                                                                                <a href="javascript:;"
                                                                                                   class="${section.classA}">
                                                                                                    <i class="${section.classI}"></i>
                                                                                                </a>
                                                                                            </td>
                                                                                            <td class="editable">${section.childTitle}</td>
                                                                                            <td>
                                                                                                <select>
                                                                                                    <option value="null"
                                                                                                            <c:if test="${'null'.equals(section.type)}">selected="selected"</c:if>>
                                                                                                        请选择类型
                                                                                                    </option>
                                                                                                    <option value="bend"
                                                                                                            <c:if test="${'bend'.equals(section.type)}">selected="selected"</c:if>>
                                                                                                        弯头
                                                                                                    </option>
                                                                                                    <option value="threeLinks"
                                                                                                            <c:if test="${'threeLinks'.equals(section.type)}">selected="selected"</c:if>>
                                                                                                        三通
                                                                                                    </option>
                                                                                                    <option value="transition"
                                                                                                            <c:if test="${'transition'.equals(section.type)}">selected="selected"</c:if>>
                                                                                                        变径
                                                                                                    </option>
                                                                                                    <option value="header"
                                                                                                            <c:if test="${'header'.equals(section.type)}">selected="selected"</c:if>>
                                                                                                        联箱
                                                                                                    </option>
                                                                                                </select>
                                                                                            </td>
                                                                                            <td>
                                                                                                <input class="form-control input-small"
                                                                                                       type="text"
                                                                                                       value="${section.coefficient}">
                                                                                            </td>
                                                                                            <td>
                                                                                                <input class="form-control input-small"
                                                                                                       type="text"
                                                                                                       value="${section.dyHead}">
                                                                                            </td>
                                                                                            <td>
                                                                                                <input class="form-control input-small"
                                                                                                       type="text"
                                                                                                       value="${section.resistanceLost}">
                                                                                            </td>
                                                                                        </tr>
                                                                                    </c:if>
                                                                                </c:forEach>
                                                                                <tr>
                                                                                    <td><a href="javascript:;"
                                                                                           class="btn yellow hideAll"
                                                                                           data-flag="部件"><i
                                                                                            class="fa fa-angle-up"></i></a>
                                                                                    </td>
                                                                                    <td colspan="5"><h4>部件阻力</h4></td>
                                                                                </tr>
                                                                                <c:forEach items="${tao.sectionList}"
                                                                                           var="section">
                                                                                    <c:if test="${section.sectionType == 3}">
                                                                                        <tr data-flag="部件"
                                                                                            id="${section.id}">
                                                                                            <td>
                                                                                                <a href="javascript:;"
                                                                                                   class="${section.classA}">
                                                                                                    <i class="${section.classI}"></i>
                                                                                                </a>
                                                                                            </td>
                                                                                            <td class="editable">${section.childTitle}</td>
                                                                                            <td>
                                                                                                <select>
                                                                                                    <option value="null"
                                                                                                            <c:if test="${'null'.equals(section.type)}">selected="selected"</c:if>>
                                                                                                        请选择类型
                                                                                                    </option>
                                                                                                    <option value="airdoor"
                                                                                                            <c:if test="${'airdoor'.equals(section.type)}">selected="selected"</c:if>>
                                                                                                        风门
                                                                                                    </option>
                                                                                                    <option value="sinkhole"
                                                                                                            <c:if test="${'sinkhole'.equals(section.type)}">selected="selected"</c:if>>
                                                                                                        缩孔
                                                                                                    </option>
                                                                                                    <option value="other"
                                                                                                            <c:if test="${'other'.equals(section.type)}">selected="selected"</c:if>>
                                                                                                        其他
                                                                                                    </option>
                                                                                                </select>
                                                                                            </td>
                                                                                            <td>
                                                                                                <input class="form-control input-small"
                                                                                                       type="text"
                                                                                                       value="${section.coefficient}">
                                                                                            </td>
                                                                                            <td>
                                                                                                <input class="form-control input-small"
                                                                                                       type="text"
                                                                                                       value="${section.dyHead}">
                                                                                            </td>
                                                                                            <td>
                                                                                                <input class="form-control input-small"
                                                                                                       type="text"
                                                                                                       value="${section.resistanceLost}">
                                                                                            </td>
                                                                                        </tr>
                                                                                    </c:if>
                                                                                </c:forEach>

                                                                                <tr>
                                                                                    <td><a href="javascript:;"
                                                                                           class="btn yellow hideAll"
                                                                                           data-flag="设备"><i
                                                                                            class="fa fa-angle-up"></i></a>
                                                                                    </td>
                                                                                    <td colspan="5"><h4>设备阻力</h4></td>
                                                                                </tr>
                                                                                <c:forEach items="${tao.sectionList}"
                                                                                           var="section">
                                                                                    <c:if test="${section.sectionType == 4}">
                                                                                        <tr data-flag="设备"
                                                                                            id="${section.id}">
                                                                                            <td>
                                                                                                <a href="javascript:;"
                                                                                                   class="${section.classA}">
                                                                                                    <i class="${section.classI}"></i>
                                                                                                </a>
                                                                                            </td>
                                                                                            <td class="editable">${section.childTitle}</td>
                                                                                            <td>
                                                                                            </td>
                                                                                            <td>
                                                                                                <input class="form-control input-small"
                                                                                                       type="text"
                                                                                                       value="${section.coefficient}">
                                                                                            </td>
                                                                                            <td>
                                                                                                <input class="form-control input-small"
                                                                                                       type="text"
                                                                                                       value="${section.dyHead}">
                                                                                            </td>
                                                                                            <td>
                                                                                                <input class="form-control input-small"
                                                                                                       type="text"
                                                                                                       value="${section.resistanceLost}">
                                                                                            </td>
                                                                                        </tr>
                                                                                    </c:if>
                                                                                </c:forEach>
                                                                                <tr>
                                                                                    <td colspan="6"><h4>其他阻力</h4></td>
                                                                                </tr>
                                                                                <c:forEach items="${tao.sectionList}"
                                                                                           var="section">
                                                                                    <c:if test="${section.sectionType == 5}">
                                                                                        <tr id="${section.id}" data-flag="其他">
                                                                                            <td></td>
                                                                                            <td><h4>${section.childTitle}</h4></td>
                                                                                            <td>
                                                                                            </td>
                                                                                            <td>
                                                                                                <input class="form-control input-small"
                                                                                                       type="text"
                                                                                                       value="${section.coefficient}">
                                                                                            </td>
                                                                                            <td>
                                                                                                <input class="form-control input-small"
                                                                                                       type="text"
                                                                                                       value="${section.dyHead}">
                                                                                            </td>
                                                                                            <td>
                                                                                                <input class="form-control input-small"
                                                                                                       type="text"
                                                                                                       value="${section.resistanceLost}">
                                                                                            </td>
                                                                                        </tr>
                                                                                    </c:if>
                                                                                </c:forEach>
                                                                                <tr>
                                                                                    <td colspan="2"><h4>区间阻力损失</h4></td>
                                                                                    <td colspan="4">
                                                                                        <input class="form-control input-large text-center"
                                                                                               type="text" readonly>
                                                                                    </td>
                                                                                </tr>
                                                                                </tbody>
                                                                            </table>
                                                                        </c:forEach>
                                                                        <input type="button"
                                                                               class="btn blue btn-block template_2_add"
                                                                               value="区间添加" baseId="${base.id}">
                                                                        <div class="clearfix"></div>
                                                                        <div class="col-md-12 margin-top-20">
                                                                            <div class="form-group">
                                                                                <label class="control-label col-md-3"
                                                                                       style="padding-left: 0; padding-right: 0;"
                                                                                        >
                                                                                    <h4><b>所有区间总阻力</b></h4>
                                                                                </label>
                                                                                <div class="col-md-9">
                                                                                    <input type="text"
                                                                                           class="form-control input-inline input-large total" readonly>
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </c:forEach>
                                <!--道体阻力-->
                                <input type="button" class="btn green btn-block" value="道体阻力添加" id="template_1_add">
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="modal fade" id="modalDialog" tabindex="-1" role="basic" aria-hidden="true" data-keyboard="false"
     data-backdrop="static">
    <div class="modal-dialog" style="width: 1024px;">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title">相关阻力计算</h4>
            </div>
            <div class="modal-body">
                <div class="portlet-body">
                    <iframe id="toolbarIframe" style="border: none;width:100%; height: 480px;" frameBorder="0"></iframe>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn blue" id="getToolBarValues"><spring:message code="save"/></button>
                <button type="button" class="btn default" id="quit" data-dismiss="modal"><spring:message
                        code="close"/></button>
            </div>
        </div>

        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>
<%@include file="../includes/footer.jsp" %>
<%@include file="../includes/bottomscript.jsp" %>
<script src="<c:url value="/js/enthalpy/CoalPulverizingSystem.js"/>" type="text/javascript"></script>
<script>
    <%
        if (session.getAttribute("caseId") == null) {
    %>
    toast.error("方案为空，请新建方案");
    setTimeout(function () {
        window.location.href = basePath + "power/power?menuId=12";
    }, 1200);
    <%
    } else {
    %>
    CoalPulverizingSystem.init('${E118}','${E119}');
    <%
    }
    %>
</script>
</body>
</html>
